using System;
using System.ComponentModel;
using System.Transactions;

using SIS.ENT;
using SIS.DAL;


/// <summary>
/// The TeacherQualtificationTableManager class is responsible for managing BO.TeacherQualtificationTable objects in the system.
/// </summary>
[DataObjectAttribute()]
public class TeacherQualtificationTableManager
  {

#region "Public Methods"

/// <summary>
/// Gets a list with all TeacherQualtificationTable objects in the database.
/// </summary>
/// <returns>A list with all TeacherQualtificationTable from the database when the database contains any, or null otherwise.</returns>
[DataObjectMethod(DataObjectMethodType.Select, true)]
public static TeacherQualtificationTableList GetList(){
return TeacherQualtificationTableDB.GetList();
}

[DataObjectMethod(DataObjectMethodType.Select, true)]
public static TeacherQualtificationTableList GetList(int userAccount)
{
    return TeacherQualtificationTableDB.GetList(userAccount);
}

/// <summary>
/// Gets a single TeacherQualtificationTable from the database without its data.
/// </summary>
/// <param name="teacherQualtificationKey">The TeacherQualtificationKey of the TeacherQualtificationTable in the database.</param>
/// <returns>A TeacherQualtificationTable object when the TeacherQualtificationKey exists in the database, or <see langword="null"/> otherwise.</returns>
[DataObjectMethod(DataObjectMethodType.Select, false)]
public static TeacherQualtificationTable GetItem(int teacherQualtificationKey){
return GetItem(teacherQualtificationKey, false);
}

/// <summary>
/// Gets a single TeacherQualtificationTable from the database.
/// </summary>
/// <param name="teacherQualtificationKey">The TeacherQualtificationKey of the TeacherQualtificationTable in the database.</param>
/// <param name="getTeacherQualtificationTableRecords">Determines whether to load all associated TeacherQualtificationTable records as well.</param>
/// <returns>
/// A TeacherQualtificationTable object when the TeacherQualtificationKey exists in the database, or <see langword="null"/> otherwise.
/// </returns>
[DataObjectMethod(DataObjectMethodType.Select, false)]
public static TeacherQualtificationTable GetItem(int teacherQualtificationKey, bool getTeacherQualtificationTableRecords){
TeacherQualtificationTable myTeacherQualtificationTable = TeacherQualtificationTableDB.GetItem(teacherQualtificationKey);
return myTeacherQualtificationTable;
}

/// <summary>
/// Saves a TeacherQualtificationTable in the database.
/// </summary>
/// <param name="myTeacherQualtificationTable">The TeacherQualtificationTable instance to save.</param>
/// <returns>The new TeacherQualtificationKey if the TeacherQualtificationTable is new in the database or the existing TeacherQualtificationKey when an item was updated.</returns>
[DataObjectMethod(DataObjectMethodType.Update, true)]
public static int Save(TeacherQualtificationTable myTeacherQualtificationTable){
using (TransactionScope myTransactionScope = new TransactionScope()){
int teacherQualtificationTableTeacherQualtificationKey = TeacherQualtificationTableDB.Save(myTeacherQualtificationTable);

//  Assign the TeacherQualtificationTable its new (or existing TeacherQualtificationKey).
myTeacherQualtificationTable.TeacherQualtificationKey = teacherQualtificationTableTeacherQualtificationKey;

myTransactionScope.Complete();

return teacherQualtificationTableTeacherQualtificationKey;
}
}

/// <summary>
/// Deletes a TeacherQualtificationTable from the database.
/// </summary>
/// <param name="myTeacherQualtificationTable">The TeacherQualtificationTable instance to delete.</param>
/// <returns>Returns true when the object was deleted successfully, or false otherwise.</returns>
[DataObjectMethod(DataObjectMethodType.Delete, true)]
public static bool Delete(TeacherQualtificationTable myTeacherQualtificationTable){
return TeacherQualtificationTableDB.Delete(myTeacherQualtificationTable.TeacherQualtificationKey);
}

[DataObjectMethod(DataObjectMethodType.Delete, true)]
public static bool Delete(int TeacherQualtificationKey)
{
    return TeacherQualtificationTableDB.Delete(TeacherQualtificationKey);
}

#endregion

}

